/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * articulos_sie_traspaso_detalle.java
 *
 * Created on 16/05/2011, 12:18:00 PM
 */

package sie_invdis;


import java.sql.*;
import javax.swing.*;

import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.JTable.*;
import java.awt.*;
import java.util.Date;
import java.util.Calendar;
import java.text.SimpleDateFormat;
import java.text.ParseException;
import java.text.*;


/**
 *
 * @author Michelle
 */
public class articulos_sie_traspaso_detalle extends javax.swing.JFrame {


    private javax.swing.table.DefaultTableModel jtable_modelo_traspaso;

    private SimpleDateFormat formateador = new SimpleDateFormat("dd-MM-yyyy");
    private SimpleDateFormat formateadoresta = new SimpleDateFormat("yyyy-MM-dd");

    bd_conexion x = new bd_conexion() ;
    //se creaa la variable resultset
    ResultSet rs = null;
    int statusdocumento=0,indexactual=0,controlcombo=0;
    /** Creates new form articulos_sie_traspaso_detalle */
    public articulos_sie_traspaso_detalle() {
      
        initComponents();

    }

      public articulos_sie_traspaso_detalle(int foliotras) {
        this.iniciar_modelo_traspaso();
        initComponents();
        this.carga_datos_encabezado(1, String.valueOf(foliotras));
        this.carga_datos_detalle(4, foliotras);
        this.verexistencias();

    jt_foliosdetalle.getColumnModel().getColumn(0).setPreferredWidth(80);//Folio
    jt_foliosdetalle.getColumnModel().getColumn(1).setPreferredWidth(20);//status
    jt_foliosdetalle.getColumnModel().getColumn(2).setPreferredWidth(50);//doc ant.
    jt_foliosdetalle.getColumnModel().getColumn(3).setPreferredWidth(120);//fecha
    jt_foliosdetalle.getColumnModel().getColumn(4).setPreferredWidth(60);//fecha llega tienda
    jt_foliosdetalle.getColumnModel().getColumn(5).setPreferredWidth(45);//f.recepcion
    jt_foliosdetalle.getColumnModel().getColumn(6).setPreferredWidth(45);//Dias Trans.
    jt_foliosdetalle.getColumnModel().getColumn(7).setPreferredWidth(45);//guia
    jt_foliosdetalle.getColumnModel().getColumn(8).setPreferredWidth(45);//Cliente
    
    jt_foliosdetalle.getTableHeader().setBackground(Color.yellow);
    this.iniciar_modelo_tiendasexisc(this.jtf_idtie1.getText());
    controlcombo=1;
    }


private void iniciar_modelo_traspaso()
    {
        jtable_modelo_traspaso=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_traspaso.addColumn("<html><b>Temp. Entrada</b></html>");
        jtable_modelo_traspaso.addColumn("<html><b>id</b></html>");
        jtable_modelo_traspaso.addColumn("<html><b>Clave</b></html>");
        jtable_modelo_traspaso.addColumn("<html><b>Descripcion</b></html>");
        jtable_modelo_traspaso.addColumn("<html><b>Item</b></html>");
        jtable_modelo_traspaso.addColumn("<html><b>Precio</b></html>");
        jtable_modelo_traspaso.addColumn("<html><b>Pz Env.</b></html>");
        jtable_modelo_traspaso.addColumn("<html><b>Pz. Recib.</b></html>");
        jtable_modelo_traspaso.addColumn("<html><b>Dif</b></html>");
        jtable_modelo_traspaso.addColumn("<html><b>Costo</b></html>");
        jtable_modelo_traspaso.addColumn("<html><b>Exis.Orig</b></html>");
        jtable_modelo_traspaso.addColumn("<html><b>I.Cost.E</b></html>");
        jtable_modelo_traspaso.addColumn("<html><b>I.Cost.R</b></html>");
   }
private void iniciar_modelo_tiendasexisc(String tienda)
    {
        String texto="select * from x1sieuno_articulo_inven_ubicacion(1,"+tienda+",'"+tienda+"','','','') as (id smallint,des text);";
        System.out.println("ubicar"+texto);
        try
            {
              rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
               while (rs.next())
                    {
                        this.jcbx_tiendas.addItem(rs.getString("id")+":"+rs.getString("des"));
                    }



             }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
    }
private void carga_datos_encabezado(int opbus,String tbusca)
{
       String fechaorigen="",fechaentrega="";
       DecimalFormat miformat = new DecimalFormat("###,###,###,###");
       
       //invoco al metodo que trae el recordset de datos
  
        try
         {
                 rs = x.sieuno_executediversosv2("select * from x1sieuno_articulo_traspasos_catalogo('"+variables_global.getidtiendami()+"',"+opbus+",'"+tbusca+"') as (id integer,fecha date,idempleaelabora integer,totpiezas real,totalpiezasrecibe real,idtiendaorigen integer,idtiendadestino integer,idstatus integer,hora time without time zone,idempleadorecepcion integer, fecharecepcion date, horarecepcion time without time zone,observacionenvio text,observarecepcion text,tiendaorigennombre text,tiendadestinonombre text,nombreelabora text,nombrerecepciona text,statusnombre text,diastra integer);",variables_global.getconexiongral());
            while (rs.next())
                {
                   this.jtf_foliotienda.setText(rs.getString("id"));
                   this.tf_status.setText(rs.getString("statusnombre"));
                   this.jtf_idtie.setText(rs.getString("idtiendaorigen"));
                   this.jtf_idtie1.setText(rs.getString("idtiendadestino"));
                   this.tf_tiendaorigen.setText(rs.getString("tiendaorigennombre"));
                   fechaorigen=""+this.fechaeuropea(rs.getString("fecha"))+":"+DiaSemana(this.fechaeuropea(rs.getString ("fecha")))+" "+rs.getString ("hora").substring(0, 5)+"";
                   this.jtf_fecharecibidotienda.setText(fechaorigen);
                   this.jtf_tiendadestino.setText(rs.getString("tiendadestinonombre"));
                   if(rs.getString("fecharecepcion") != null )
                        {
                            fechaentrega=""+this.fechaeuropea(rs.getString("fecharecepcion"))+":"+this.DiaSemana(this.fechaeuropea(rs.getString("fecharecepcion")))+" "+rs.getString ("horarecepcion").substring(0, 5)+"";
                        }
                   this.jtf_fecharecibiotienda.setText(fechaentrega);
                   this.jtf_piezaenvia.setText(miformat.format(rs.getFloat("totpiezas")));
                   this.jtf_piezasrecibidas.setText(miformat.format(rs.getFloat("totalpiezasrecibe")));
                   this.jtf_diferencia.setText(miformat.format(rs.getFloat("totpiezas")-rs.getFloat("totalpiezasrecibe")));
                   this.jtf_elaboro.setText(rs.getString("nombreelabora"));
                   this.jtf_recepciono.setText(rs.getString("nombrerecepciona"));

                   this.jep_observaenvio.setText("<p align=justify>"+rs.getString("observacionenvio")+"</p>");
                   this.jep_observarecibe.setText("<p align=justify>"+rs.getString("observarecepcion")+"</p>");
                   //fnewRow[9]=rs.getString("observacionenvio");
                   statusdocumento=rs.getInt("idstatus");

                    if (statusdocumento==1)
                        {
                            this.jtf_piezasrecibidas.setText("0");
                        }
                   
                }
        }
        catch(Exception e)
            {
                System.out.println(e.getMessage());
            }

}
private void carga_datos_detalle(int opbus,int folio)
{
      
       DecimalFormat miformat = new DecimalFormat("############.####");
       DecimalFormat miformatde = new DecimalFormat("############.####");
       Object[] fnewRow = new Object[13];
       double importece=0,importecr=0,canenv=0,canrec=0,precio=0;
       String texto="select * from x1sieuno_articulo_traspasos_detallev2("+opbus+","+folio+","+this.jtf_idtie.getText()+") as (id integer,Cns_det_tra integer,idproducto integer,Cns_det_pro integer,clave_producto text,descuento real,precio real,cantidad_enviado real,cantidad_recibido real,Id_cat_des integer,Id_det_des integer,descripcion character varying(80),item character varying(80),tement character varying(25),costo real,ultcosto numeric,importeuc double precision);";
       System.out.println(texto);
        try
         {
             rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                    fnewRow[0]=rs.getString("tement");
                    fnewRow[1]=rs.getString("idproducto");
                    fnewRow[2]=rs.getString("clave_producto");
                    fnewRow[3]=rs.getString("descripcion");
                    fnewRow[4]=rs.getString("item");
                    fnewRow[5]=miformat.format(rs.getDouble("precio"));
                    fnewRow[6]=miformat.format(rs.getDouble("cantidad_enviado"));
                    if (statusdocumento==1)
                        {
                            fnewRow[7]="0";
                            fnewRow[12]="0";
                        }
                    else
                        {
                            fnewRow[7]=miformat.format(rs.getDouble("cantidad_recibido"));
                            if(variables_global.getnivelusu()<3)
                                {
                                    fnewRow[12]=miformatde.format(rs.getDouble("ultcosto")*rs.getFloat("cantidad_recibido"));
                                }
                            else
                                {
                                    fnewRow[12]="0";
                                }
                            importecr+=rs.getFloat("ultcosto")*rs.getDouble("cantidad_recibido");
                            canrec+=rs.getFloat("cantidad_recibido");
                        }


                    fnewRow[8]=miformat.format(rs.getDouble("cantidad_recibido")-rs.getDouble("cantidad_enviado"));

                    if(variables_global.getnivelusu()<3)
                        {
                                    fnewRow[9]=miformatde.format(rs.getDouble("ultcosto"));
                                    fnewRow[10]="0";
                                    fnewRow[11]=miformatde.format(rs.getDouble("ultcosto")*rs.getDouble("cantidad_enviado"));
                        }
                    else
                        {
                                    fnewRow[9]="0";
                                    fnewRow[10]="0";
                                    fnewRow[11]="0";
                        }

                   
                    importece+=rs.getDouble("ultcosto")*rs.getDouble("cantidad_enviado");
                    canenv+=rs.getDouble("cantidad_enviado");
                    precio+=rs.getDouble("precio")*rs.getDouble("cantidad_enviado");
                    jtable_modelo_traspaso.addRow(fnewRow);
                }
        }
        catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
       this.jtf_importeprecio1.setText(miformatde.format(importece));
       this.jtf_importeprecio2.setText(miformatde.format(importecr));
       this.jtf_importeprecio3.setText(miformatde.format(importecr-importece));

       this.jtf_totalpiezas.setText(miformatde.format(canenv));
       this.jtf_totalpiezas1.setText(miformatde.format(canrec));
       this.jtf_totalpiezas2.setText(miformatde.format(canrec-canenv));

       this.jtf_importeprecio.setText(miformatde.format(precio));
//this.calcularimportes();
}

private void carga_datos_fotospaginacion(int pagina)
    {
        String textohtml="";
        int nif=0,pag=pagina,nobjetotabla=this.jtable_modelo_traspaso.getRowCount(),nip=0,ni=0,fila=0,artxpag=Integer.valueOf(this.jtf_fotosartxpag.getText().toString());
        float totalpaginas=this.jtable_modelo_traspaso.getRowCount()/artxpag;

        this.jlbl_paginas.setText("PAGINAS :"+totalpaginas);
             nif=((pag+1)*artxpag);
             nip=((pag)*artxpag);
                        if (nif < nobjetotabla )
                            {
                                nobjetotabla=nif;
                            }
  System.out.println("filas x pagina"+artxpag+"tOTAL FILAS:"+this.jtable_modelo_traspaso.getRowCount()+" PAGINA ACTUAL "+pagina+" filainicial "+ nip + " Fila Final"+ nobjetotabla);
                    /*Impresion de los productos*/
                        for(ni=nip;ni<nobjetotabla;ni++)
                        {
                            System.out.println(" fila Actual "+ ni );
                                if (fila<=0)
                                    {
                                    	textohtml+= "<tr>";
                                    }
                                    fila++;
                                    textohtml+="<th>"+jtable_modelo_traspaso.getValueAt(ni, 3).toString()+"<br>"+jtable_modelo_traspaso.getValueAt(ni, 4).toString() + " $"+jtable_modelo_traspaso.getValueAt(ni, 5).toString()+ "<br>"+"<img src=\"http://"+variables_global.getHostfotos()+"/"+variables_global.getcarpetaaplicacion()+"/fotos/"+jtable_modelo_traspaso.getValueAt(ni, 2).toString()+".JPG\" width=230 height=190 border=0 alt=\"Foto Articulo\" />"+"</th>";
                                 if (fila>=4)
                                    {
                                        textohtml+= "</tr>";
                                        fila=0;
                                    }
                        }
         this.jepn_fotos.setText("<html><head></head><body><table>"+textohtml+"</table></body></html>");
         System.out.println(" este es html "+ textohtml );
    }
private void calcularimportes()
    {
      DecimalFormat myf = new DecimalFormat("###,###,###,###,###.##");
     int numerofilas=this.jtable_modelo_traspaso.getRowCount(),error=0;
    String punto="",comas="",imagen="";
    float cantidad=0,costo=0,precio=0;
    System.out.println("calculandoimporte"+numerofilas);
     for(int i = 0 ;i < numerofilas; i++)
                {
                 try
                       {
                            cantidad = Float.valueOf(this.jtable_modelo_traspaso.getValueAt(i, 6).toString()).floatValue();
                            costo += Float.valueOf(this.jtable_modelo_traspaso.getValueAt(i, 9).toString()).floatValue()*cantidad;
                            precio += Float.valueOf(this.jtable_modelo_traspaso.getValueAt(i, 5).toString()).floatValue()*cantidad;


                        }
                            catch (NumberFormatException nfe) {
                            cantidad=0;
                            costo=0;
                            error=1;
                        }
                      //jtable_modelo_detalle.setValueAt(importefila,i,12);
                }
    //doctoimpuesto=(doctosubtotal-doctodescuento)*impuesto;

    this.jtf_totalpiezas.setText(myf.format(cantidad));
    this.jtf_importeprecio1.setText(myf.format(costo));
    this.jtf_importeprecio.setText(myf.format(precio));

    }
private void verexistencias()
        {

    int numerofilas = this.jtable_modelo_traspaso.getRowCount(),ii=0;
    String selectin="";
        for( ii=0;ii<numerofilas;ii++)
                {
                if (ii>0)
                    {
                        selectin+=".";
                    }
                selectin+=""+jtable_modelo_traspaso.getValueAt(ii ,2)+"";
                }

    System.out.println(selectin);
            String texto="select * from x1sieuno_articulo_detalle(1,"+this.jtf_idtie.getText()+",'','"+selectin+"') as (ida integer,min integer,max integer,exi double precision,idp integer,cod text,cndt integer,descor text,preve double precision,pre_re real,clavepro text)";
            System.out.println(texto);
            String despartido[]=null,mi="",ma="";
            int columnatitulo=0;
            try
                {
               rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
                while (rs.next())
                    {
                            despartido=rs.getString("descor").split(":");
                             if ((rs.getString("max")!=null) && (rs.getString("min")!=null))
                        {
                            mi=rs.getString("min");
                            ma=rs.getString("max");

                        }
                    else
                        {
                            mi="0";
                            ma="0";
                        }
                            this.crea_hoja_agregaexistencias(rs.getString("clavepro"),rs.getString("exi"),10,mi,ma);
                     }
                }
            catch(Exception e)
                {
                    System.out.println(e.getMessage());
                }

        }

private void crea_hoja_agregaexistencias(String codigo,String existencia,int columna,String smin,String smax)
    {
        DecimalFormat miformat = new DecimalFormat("###,###,###");
        int numerofilas=this.jtable_modelo_traspaso.getRowCount(),ii=00,encontrado=0;
        String mesactual="",colorabre="",colorcierra="";

        float abononumerico=0,importe=0;
       //invoco al metodo que trae el recordset de datos
        abononumerico=Float.valueOf(existencia);

        for( ii=0;ii<numerofilas;ii++)
                {
                    mesactual=jtable_modelo_traspaso.getValueAt(ii, 2).toString();
                    // System.out.println("Agregando:"+mesactual+" "+mes);
                    if (mesactual.equals(codigo))
                        {
                            encontrado=1;


                            jtable_modelo_traspaso.setValueAt(miformat.format(abononumerico),ii ,columna);
                        }
                }
    }

private void dioclick(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
         System.out.println("dio doble  click");
         int fila = jt_foliosdetalle.getSelectedRow();
         String valor = jtable_modelo_traspaso.getValueAt(fila, 1).toString();

        //JFrame mainFrame = Sie_invdisApp.getApplication().getMainFrame();
        articulos_sie_editar fase=new articulos_sie_editar(valor);
        fase.pack();
        fase.setVisible(true);
        //setVisible(false);
    }

private String  fechaeuropea(String fecha) {

         //resibe cadena de fecha en formato americano yyyy-MM-dd
        java.util.Date fechaestaeuropa=null;
       SimpleDateFormat formateadorestaeuropa = new SimpleDateFormat("dd-MM-yyyy");
       String cadenafecha="";
        try
         {
          fechaestaeuropa = formateadoresta.parse(fecha);
         }
        catch (ParseException e)
          {
             //Error, la cadena de texto no se puede convertir en fecha.
          }
       cadenafecha= formateadorestaeuropa.format(fechaestaeuropa);
       return cadenafecha;

    }
private String DiaSemana(String fe) {
         String dia = "";
       java.util.Date fecha=null;
         try
            {
             fecha = formateador.parse(fe);

           }
        catch (ParseException e)
            {
            //Error, la cadena de texto no se puede convertir en fecha.
            }
        Calendar cal= Calendar.getInstance();
        cal.setTime(fecha);
        //ojo para establecer o recetear cada parte de la fecha por separado
        //cal.set(Calendar.YEAR, fecha.getYear());
        //cal.set(Calendar.MONTH, fecha.getMonth());
        //cal.set(Calendar.DAY_OF_MONTH, fecha.getDay());
        int diaInt = cal.get(Calendar.DAY_OF_WEEK);
        switch (diaInt) {
            case 1:
                dia = "Domingo";
                break;
            case 2:
                dia = "Lunes";
                break;
            case 3:
                dia = "Martes";
                break;
            case 4:
                dia = "Miercoles";
                break;
            case 5:
                dia = "Jueves";
                break;
            case 6:
                dia = "Viernes";
                break;
            case 7:
                dia = "Sabado";
                break;

        }
        return dia;
    }

private  void ayuda()
    {
                String punto1="1.-Detalle de Traspaso de Mercancia, cada opcion se autodescribe brevemente\n";
                String punto2="2.- Cada Boton tiene Una letra Resaltada el cual indica su metodo abreviado uselo si desea mayor rapides ( ejemplo Alt+a tendra ayuda automaticamente)\n";
                String punto3="3.- la opcion Recepcionar Esta en su Punto de Venta este Documento es Solo Informativo\n";
                JOptionPane.showMessageDialog(null,punto1+punto2+punto3, "Sistema Integral(Detalle Traspaso) : Ayuda",1);
    }


private void imprimirfortras(int pag,float ptotal)
    {
     this.objimpresora=new com_distri_folios_imprimir();

     this.objimpresora.setOneItem_cadenas_a_imprimir(": :  S.I. Recepciones:  TRASPASO  : :");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Fecha:"+this.jtf_fecharecibidotienda.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Origen: "+this.tf_tiendaorigen.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Destino: "+this.jtf_tiendadestino.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Folio del Traspaso :"+this.jtf_foliotienda.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("IDCODIGO/DES              PRECIO      ENVIADO/RECIBIDA");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Observaciones:"+this.jep_observaenvio.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Articulos Enviados:"+this.jtf_piezaenvia.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Articulos Recibidos:"+this.jtf_piezasrecibidas.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Diferencia:"+this.jtf_diferencia.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("paginas:"+ pag + " de "+ptotal+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Realizo: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("OBS:"+this.jtf_diferencia.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Recibio: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setObjeto_tabla(jt_foliosdetalle);
     this.objimpresora.imprimir_all(9,pag);
    }

private void imprimirfortrascompleto(int pag,float ptotal)
    {
     this.objimpresora=new com_distri_folios_imprimir();

     this.objimpresora.setOneItem_cadenas_a_imprimir(": :  S.I. Recepciones:  TRASPASO  : :");
     this.objimpresora.setOneItem_cadenas_a_imprimir("       Fecha:"+this.jtf_fecharecibidotienda.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("       Origen: "+this.tf_tiendaorigen.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("       Destino: "+this.jtf_tiendadestino.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("       Folio del Traspaso :"+this.jtf_foliotienda.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("IDCODIGO/DES              PRECIO      ENVIADO/RECIBIDA");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Observaciones:"+this.jep_observaenvio.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
      this.objimpresora.setOneItem_cadenas_a_imprimir("paginas:"+ pag + " de "+ptotal+"");
     if((pag+1)>=ptotal)
        {
            this.objimpresora.setOneItem_cadenas_a_imprimir("       Articulos Enviados:"+this.jtf_piezaenvia.getText()+" Costo Env:"+this.jtf_importeprecio1.getText()+" Precio Env:"+this.jtf_importeprecio.getText());
            this.objimpresora.setOneItem_cadenas_a_imprimir("       Articulos Recibidos:"+this.jtf_piezasrecibidas.getText()+" Costo Rec:"+this.jtf_importeprecio2.getText());
            this.objimpresora.setOneItem_cadenas_a_imprimir("       Diferencia:"+this.jtf_diferencia.getText()+" Costo Dif:"+this.jtf_importeprecio3.getText());
        }
     //this.objimpresora.setOneItem_cadenas_a_imprimir("paginas:"+ pag + " de "+ptotal+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("       Realizo: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("       OBS:"+this.jtf_diferencia.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Recibio: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setObjeto_tabla(jt_foliosdetalle);
     this.objimpresora.imprimir_all(19,pag);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel3 = new javax.swing.JPanel();
        jLabel6 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        tf_tiendaorigen = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        tf_status = new javax.swing.JTextField();
        jtf_foliotienda = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jtf_fecharecibidotienda = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        jtf_tiendadestino = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jtf_fecharecibiotienda = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jtf_elaboro = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        jtf_recepciono = new javax.swing.JTextField();
        jScrollPane2 = new javax.swing.JScrollPane();
        jep_observaenvio = new javax.swing.JEditorPane();
        jScrollPane3 = new javax.swing.JScrollPane();
        jep_observarecibe = new javax.swing.JEditorPane();
        jLabel1 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jtf_piezaenvia = new javax.swing.JTextField();
        jtf_piezasrecibidas = new javax.swing.JTextField();
        jLabel13 = new javax.swing.JLabel();
        jtf_diferencia = new javax.swing.JTextField();
        jtf_idtie = new javax.swing.JTextField();
        jtf_idtie1 = new javax.swing.JTextField();
        jPanel2 = new javax.swing.JPanel();
        jbtn_helpayudame = new javax.swing.JButton();
        jbtn_salir = new javax.swing.JButton();
        jbtn_imprimir = new javax.swing.JButton();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jt_foliosdetalle = new javax.swing.JTable(){
            public boolean isCellEditable(int rowIndex, int mColIndex) {

                return false;

            }
        }
        ;
        jLabel14 = new javax.swing.JLabel();
        jtf_totalpiezas = new javax.swing.JTextField();
        jLabel15 = new javax.swing.JLabel();
        jtf_importeprecio = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        jtf_importeprecio1 = new javax.swing.JTextField();
        jLabel17 = new javax.swing.JLabel();
        jtf_importeprecio2 = new javax.swing.JTextField();
        jLabel18 = new javax.swing.JLabel();
        jtf_importeprecio3 = new javax.swing.JTextField();
        jtf_totalpiezas1 = new javax.swing.JTextField();
        jtf_totalpiezas2 = new javax.swing.JTextField();
        jLabel19 = new javax.swing.JLabel();
        jcbx_tiendas = new javax.swing.JComboBox();
        jPanel4 = new javax.swing.JPanel();
        jScrollPane4 = new javax.swing.JScrollPane();
        jepn_fotos = new javax.swing.JEditorPane();
        jtf_fotosartxpag = new javax.swing.JTextField();
        jlbl_paginas = new javax.swing.JLabel();
        jbtn_anterior = new javax.swing.JButton();
        jtf_paginaactual = new javax.swing.JTextField();
        jbtn_siguiente = new javax.swing.JButton();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jmni_salir = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        jmni_escape = new javax.swing.JMenuItem();
        jmni_impresioncom = new javax.swing.JMenuItem();
        jMenu3 = new javax.swing.JMenu();
        jmni_ayuda = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(sie_invdis.Sie_invdisApp.class).getContext().getResourceMap(articulos_sie_traspaso_detalle.class);
        setTitle(resourceMap.getString("Form.title")); // NOI18N
        setName("Form"); // NOI18N

        jPanel3.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanel3.setName("jPanel3"); // NOI18N

        jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
        jLabel6.setName("jLabel6"); // NOI18N

        jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
        jLabel5.setName("jLabel5"); // NOI18N

        tf_tiendaorigen.setEditable(false);
        tf_tiendaorigen.setName("tf_tiendaorigen"); // NOI18N
        tf_tiendaorigen.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                tf_tiendaorigenActionPerformed(evt);
            }
        });

        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N

        tf_status.setEditable(false);
        tf_status.setName("tf_status"); // NOI18N

        jtf_foliotienda.setEditable(false);
        jtf_foliotienda.setName("jtf_foliotienda"); // NOI18N
        jtf_foliotienda.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_foliotiendaActionPerformed(evt);
            }
        });

        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N

        jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N
        jLabel8.setName("jLabel8"); // NOI18N

        jtf_fecharecibidotienda.setEditable(false);
        jtf_fecharecibidotienda.setName("jtf_fecharecibidotienda"); // NOI18N

        jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
        jLabel9.setName("jLabel9"); // NOI18N

        jtf_tiendadestino.setEditable(false);
        jtf_tiendadestino.setName("jtf_tiendadestino"); // NOI18N

        jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N
        jLabel10.setName("jLabel10"); // NOI18N

        jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N
        jLabel11.setName("jLabel11"); // NOI18N

        jtf_fecharecibiotienda.setEditable(false);
        jtf_fecharecibiotienda.setName("jtf_fecharecibiotienda"); // NOI18N

        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N

        jtf_elaboro.setEditable(false);
        jtf_elaboro.setText(resourceMap.getString("jtf_elaboro.text")); // NOI18N
        jtf_elaboro.setName("jtf_elaboro"); // NOI18N

        jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
        jLabel7.setName("jLabel7"); // NOI18N

        jtf_recepciono.setEditable(false);
        jtf_recepciono.setText(resourceMap.getString("jtf_recepciono.text")); // NOI18N
        jtf_recepciono.setName("jtf_recepciono"); // NOI18N

        jScrollPane2.setName("jScrollPane2"); // NOI18N

        jep_observaenvio.setContentType(resourceMap.getString("jep_observaenvio.contentType")); // NOI18N
        jep_observaenvio.setEditable(false);
        jep_observaenvio.setName("jep_observaenvio"); // NOI18N
        jScrollPane2.setViewportView(jep_observaenvio);

        jScrollPane3.setName("jScrollPane3"); // NOI18N

        jep_observarecibe.setContentType(resourceMap.getString("jep_observarecibe.contentType")); // NOI18N
        jep_observarecibe.setEditable(false);
        jep_observarecibe.setName("jep_observarecibe"); // NOI18N
        jScrollPane3.setViewportView(jep_observarecibe);

        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N
        jLabel12.setName("jLabel12"); // NOI18N

        jtf_piezaenvia.setEditable(false);
        jtf_piezaenvia.setText(resourceMap.getString("jtf_piezaenvia.text")); // NOI18N
        jtf_piezaenvia.setName("jtf_piezaenvia"); // NOI18N

        jtf_piezasrecibidas.setEditable(false);
        jtf_piezasrecibidas.setText(resourceMap.getString("jtf_piezasrecibidas.text")); // NOI18N
        jtf_piezasrecibidas.setName("jtf_piezasrecibidas"); // NOI18N

        jLabel13.setText(resourceMap.getString("jLabel13.text")); // NOI18N
        jLabel13.setName("jLabel13"); // NOI18N

        jtf_diferencia.setEditable(false);
        jtf_diferencia.setText(resourceMap.getString("jtf_diferencia.text")); // NOI18N
        jtf_diferencia.setName("jtf_diferencia"); // NOI18N

        jtf_idtie.setEditable(false);
        jtf_idtie.setName("jtf_idtie"); // NOI18N

        jtf_idtie1.setEditable(false);
        jtf_idtie1.setName("jtf_idtie1"); // NOI18N

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jLabel3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jtf_foliotienda, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel4)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(tf_status, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel5)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(tf_tiendaorigen, javax.swing.GroupLayout.PREFERRED_SIZE, 231, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel9)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jtf_tiendadestino, javax.swing.GroupLayout.PREFERRED_SIZE, 229, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addComponent(jLabel8)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jtf_fecharecibidotienda, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel11)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jtf_fecharecibiotienda, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jLabel2)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jtf_elaboro, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel10)
                                    .addGroup(jPanel3Layout.createSequentialGroup()
                                        .addGap(81, 81, 81)
                                        .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 218, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel6)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jScrollPane3)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addComponent(jLabel7)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jtf_recepciono, javax.swing.GroupLayout.DEFAULT_SIZE, 258, Short.MAX_VALUE))
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addGroup(jPanel3Layout.createSequentialGroup()
                                        .addComponent(jLabel12)
                                        .addGap(1, 1, 1)
                                        .addComponent(jtf_piezasrecibidas))
                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup()
                                        .addComponent(jLabel1)
                                        .addGap(1, 1, 1)
                                        .addComponent(jtf_piezaenvia, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel3Layout.createSequentialGroup()
                                        .addComponent(jLabel13)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(jtf_diferencia, javax.swing.GroupLayout.DEFAULT_SIZE, 123, Short.MAX_VALUE))
                                    .addGroup(jPanel3Layout.createSequentialGroup()
                                        .addComponent(jtf_idtie, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jtf_idtie1, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)))))))
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jtf_foliotienda, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel4)
                        .addComponent(tf_status, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel5)
                        .addComponent(tf_tiendaorigen, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel9)
                        .addComponent(jtf_tiendadestino, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jtf_elaboro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel8)
                            .addComponent(jtf_fecharecibidotienda, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel11)
                            .addComponent(jtf_fecharecibiotienda, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel2)
                            .addComponent(jLabel7)
                            .addComponent(jtf_recepciono, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 58, Short.MAX_VALUE)
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addGap(14, 14, 14)
                                .addComponent(jLabel10))
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 58, Short.MAX_VALUE)
                            .addComponent(jLabel6)))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(26, 26, 26)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1)
                            .addComponent(jtf_piezaenvia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jtf_idtie, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jtf_idtie1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel12)
                            .addComponent(jtf_piezasrecibidas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel13)
                            .addComponent(jtf_diferencia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(10, Short.MAX_VALUE))
        );

        jPanel2.setName("jPanel2"); // NOI18N

        jbtn_helpayudame.setIcon(resourceMap.getIcon("jbtn_helpayudame.icon")); // NOI18N
        jbtn_helpayudame.setText(resourceMap.getString("jbtn_helpayudame.text")); // NOI18N
        jbtn_helpayudame.setName("jbtn_helpayudame"); // NOI18N
        jbtn_helpayudame.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_helpayudameActionPerformed(evt);
            }
        });

        jbtn_salir.setIcon(resourceMap.getIcon("jbtn_salir.icon")); // NOI18N
        jbtn_salir.setText(resourceMap.getString("jbtn_salir.text")); // NOI18N
        jbtn_salir.setName("jbtn_salir"); // NOI18N
        jbtn_salir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_salirActionPerformed(evt);
            }
        });

        jbtn_imprimir.setIcon(resourceMap.getIcon("jbtn_imprimir.icon")); // NOI18N
        jbtn_imprimir.setText(resourceMap.getString("jbtn_imprimir.text")); // NOI18N
        jbtn_imprimir.setName("jbtn_imprimir"); // NOI18N
        jbtn_imprimir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_imprimirActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addGap(311, 311, 311)
                .addComponent(jbtn_imprimir)
                .addGap(175, 175, 175)
                .addComponent(jbtn_salir)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 144, Short.MAX_VALUE)
                .addComponent(jbtn_helpayudame)
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jbtn_helpayudame)
                .addComponent(jbtn_salir)
                .addComponent(jbtn_imprimir))
        );

        jTabbedPane1.setName("jTabbedPane1"); // NOI18N
        jTabbedPane1.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                jTabbedPane1StateChanged(evt);
            }
        });

        jPanel1.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
        jPanel1.setName("jPanel1"); // NOI18N

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        jt_foliosdetalle.setModel(this.jtable_modelo_traspaso);
        jt_foliosdetalle.setName("jt_foliosdetalle"); // NOI18N
        jt_foliosdetalle.setRowHeight(22);
        // TODO add your handling code here:
        jt_foliosdetalle.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jt_foliosdetalleMouseClicked(evt);
                if(evt.getClickCount() >= 2)
                {
                    dioclick(evt);
                    //System.out.println(" double click" );

                }
            }
        });
        jScrollPane1.setViewportView(jt_foliosdetalle);

        jLabel14.setText(resourceMap.getString("jLabel14.text")); // NOI18N
        jLabel14.setName("jLabel14"); // NOI18N

        jtf_totalpiezas.setEditable(false);
        jtf_totalpiezas.setFont(resourceMap.getFont("jtf_totalpiezas.font")); // NOI18N
        jtf_totalpiezas.setName("jtf_totalpiezas"); // NOI18N

        jLabel15.setText(resourceMap.getString("jLabel15.text")); // NOI18N
        jLabel15.setName("jLabel15"); // NOI18N

        jtf_importeprecio.setEditable(false);
        jtf_importeprecio.setFont(resourceMap.getFont("jtf_importeprecio.font")); // NOI18N
        jtf_importeprecio.setName("jtf_importeprecio"); // NOI18N

        jLabel16.setText(resourceMap.getString("jLabel16.text")); // NOI18N
        jLabel16.setName("jLabel16"); // NOI18N

        jtf_importeprecio1.setEditable(false);
        jtf_importeprecio1.setFont(resourceMap.getFont("jtf_importeprecio1.font")); // NOI18N
        jtf_importeprecio1.setName("jtf_importeprecio1"); // NOI18N

        jLabel17.setText(resourceMap.getString("jLabel17.text")); // NOI18N
        jLabel17.setName("jLabel17"); // NOI18N

        jtf_importeprecio2.setEditable(false);
        jtf_importeprecio2.setFont(resourceMap.getFont("jtf_importeprecio2.font")); // NOI18N
        jtf_importeprecio2.setName("jtf_importeprecio2"); // NOI18N

        jLabel18.setText(resourceMap.getString("jLabel18.text")); // NOI18N
        jLabel18.setName("jLabel18"); // NOI18N

        jtf_importeprecio3.setEditable(false);
        jtf_importeprecio3.setFont(resourceMap.getFont("jtf_importeprecio3.font")); // NOI18N
        jtf_importeprecio3.setName("jtf_importeprecio3"); // NOI18N

        jtf_totalpiezas1.setEditable(false);
        jtf_totalpiezas1.setFont(resourceMap.getFont("jtf_totalpiezas1.font")); // NOI18N
        jtf_totalpiezas1.setName("jtf_totalpiezas1"); // NOI18N

        jtf_totalpiezas2.setEditable(false);
        jtf_totalpiezas2.setFont(resourceMap.getFont("jtf_totalpiezas2.font")); // NOI18N
        jtf_totalpiezas2.setName("jtf_totalpiezas2"); // NOI18N

        jLabel19.setText(resourceMap.getString("jLabel19.text")); // NOI18N
        jLabel19.setName("jLabel19"); // NOI18N

        jcbx_tiendas.setToolTipText(resourceMap.getString("jcbx_tiendas.toolTipText")); // NOI18N
        jcbx_tiendas.setName("jcbx_tiendas"); // NOI18N
        jcbx_tiendas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jcbx_tiendasActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 992, Short.MAX_VALUE)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel14)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtf_totalpiezas, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel16)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtf_importeprecio1, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel15)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtf_importeprecio, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtf_totalpiezas1, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel17)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtf_importeprecio2, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtf_totalpiezas2, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel18)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtf_importeprecio3, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel19)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jcbx_tiendas, 0, 177, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 414, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel14)
                    .addComponent(jtf_totalpiezas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel16)
                    .addComponent(jtf_importeprecio1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel15)
                    .addComponent(jtf_importeprecio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel17)
                    .addComponent(jtf_importeprecio2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jtf_totalpiezas1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jtf_totalpiezas2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel18)
                    .addComponent(jtf_importeprecio3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jcbx_tiendas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel19))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab(resourceMap.getString("jPanel1.TabConstraints.tabTitle"), jPanel1); // NOI18N

        jPanel4.setName("jPanel4"); // NOI18N

        jScrollPane4.setName("jScrollPane4"); // NOI18N

        jepn_fotos.setContentType(resourceMap.getString("jepn_fotos.contentType")); // NOI18N
        jepn_fotos.setName("jepn_fotos"); // NOI18N
        jScrollPane4.setViewportView(jepn_fotos);

        jtf_fotosartxpag.setText(resourceMap.getString("jtf_fotosartxpag.text")); // NOI18N
        jtf_fotosartxpag.setToolTipText(resourceMap.getString("jtf_fotosartxpag.toolTipText")); // NOI18N
        jtf_fotosartxpag.setName("jtf_fotosartxpag"); // NOI18N
        jtf_fotosartxpag.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_fotosartxpagActionPerformed(evt);
            }
        });

        jlbl_paginas.setText(resourceMap.getString("jlbl_paginas.text")); // NOI18N
        jlbl_paginas.setName("jlbl_paginas"); // NOI18N

        jbtn_anterior.setIcon(resourceMap.getIcon("jbtn_anterior.icon")); // NOI18N
        jbtn_anterior.setText(resourceMap.getString("jbtn_anterior.text")); // NOI18N
        jbtn_anterior.setName("jbtn_anterior"); // NOI18N
        jbtn_anterior.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_anteriorActionPerformed(evt);
            }
        });

        jtf_paginaactual.setText(resourceMap.getString("jtf_paginaactual.text")); // NOI18N
        jtf_paginaactual.setName("jtf_paginaactual"); // NOI18N
        jtf_paginaactual.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_paginaactualActionPerformed(evt);
            }
        });

        jbtn_siguiente.setIcon(resourceMap.getIcon("jbtn_siguiente.icon")); // NOI18N
        jbtn_siguiente.setText(resourceMap.getString("jbtn_siguiente.text")); // NOI18N
        jbtn_siguiente.setName("jbtn_siguiente"); // NOI18N
        jbtn_siguiente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_siguienteActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 994, Short.MAX_VALUE)
            .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel4Layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel4Layout.createSequentialGroup()
                            .addGap(185, 185, 185)
                            .addComponent(jtf_fotosartxpag, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(50, 50, 50)
                            .addComponent(jlbl_paginas)
                            .addGap(27, 27, 27)
                            .addComponent(jbtn_anterior)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jtf_paginaactual, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jbtn_siguiente)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 382, Short.MAX_VALUE))
                        .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 984, Short.MAX_VALUE))
                    .addContainerGap()))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 467, Short.MAX_VALUE)
            .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jlbl_paginas)
                        .addComponent(jbtn_anterior)
                        .addComponent(jbtn_siguiente)
                        .addComponent(jtf_paginaactual, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jtf_fotosartxpag, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 414, Short.MAX_VALUE)
                    .addContainerGap()))
        );

        jTabbedPane1.addTab(resourceMap.getString("jPanel4.TabConstraints.tabTitle"), jPanel4); // NOI18N

        jMenuBar1.setName("jMenuBar1"); // NOI18N

        jMenu1.setText(resourceMap.getString("jMenu1.text")); // NOI18N
        jMenu1.setName("jMenu1"); // NOI18N

        jmni_salir.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.ALT_MASK));
        jmni_salir.setIcon(resourceMap.getIcon("jmni_salir.icon")); // NOI18N
        jmni_salir.setText(resourceMap.getString("jmni_salir.text")); // NOI18N
        jmni_salir.setName("jmni_salir"); // NOI18N
        jmni_salir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmni_salirActionPerformed(evt);
            }
        });
        jMenu1.add(jmni_salir);

        jMenuBar1.add(jMenu1);

        jMenu2.setText(resourceMap.getString("jMenu2.text")); // NOI18N
        jMenu2.setName("jMenu2"); // NOI18N

        jmni_escape.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ESCAPE, 0));
        jmni_escape.setText(resourceMap.getString("jmni_escape.text")); // NOI18N
        jmni_escape.setName("jmni_escape"); // NOI18N
        jmni_escape.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmni_escapeActionPerformed(evt);
            }
        });
        jMenu2.add(jmni_escape);

        jmni_impresioncom.setText(resourceMap.getString("jmni_impresioncom.text")); // NOI18N
        jmni_impresioncom.setName("jmni_impresioncom"); // NOI18N
        jmni_impresioncom.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmni_impresioncomActionPerformed(evt);
            }
        });
        jMenu2.add(jmni_impresioncom);

        jMenuBar1.add(jMenu2);

        jMenu3.setText(resourceMap.getString("jMenu3.text")); // NOI18N
        jMenu3.setName("jMenu3"); // NOI18N

        jmni_ayuda.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.ALT_MASK));
        jmni_ayuda.setIcon(resourceMap.getIcon("jmni_ayuda.icon")); // NOI18N
        jmni_ayuda.setText(resourceMap.getString("jmni_ayuda.text")); // NOI18N
        jmni_ayuda.setName("jmni_ayuda"); // NOI18N
        jmni_ayuda.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmni_ayudaActionPerformed(evt);
            }
        });
        jMenu3.add(jmni_ayuda);

        jMenuBar1.add(jMenu3);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(100, Short.MAX_VALUE))
            .addComponent(jTabbedPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 999, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTabbedPane1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void tf_tiendaorigenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tf_tiendaorigenActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_tf_tiendaorigenActionPerformed

    private void jtf_foliotiendaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_foliotiendaActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jtf_foliotiendaActionPerformed

    private void jbtn_salirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_salirActionPerformed

        // TODO add your handling code here:
        //x.cierraConexion();
         if(JOptionPane.showConfirmDialog(null, "Realmente Desea Salir?")==0){
            this.dispose();
         }
        
}//GEN-LAST:event_jbtn_salirActionPerformed

    private void jbtn_helpayudameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_helpayudameActionPerformed
        // TODO add your handling code here:
        this.ayuda();
}//GEN-LAST:event_jbtn_helpayudameActionPerformed

    private void jmni_ayudaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_ayudaActionPerformed
        // TODO add your handling code here:
        this.jbtn_helpayudameActionPerformed(evt);
    }//GEN-LAST:event_jmni_ayudaActionPerformed

    private void jmni_salirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_salirActionPerformed
        // TODO add your handling code here:
        this.jbtn_salirActionPerformed(evt);
    }//GEN-LAST:event_jmni_salirActionPerformed

    private void jmni_escapeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_escapeActionPerformed
        // TODO add your handling code here:
        this.jmni_salirActionPerformed(evt);
    }//GEN-LAST:event_jmni_escapeActionPerformed

    private void jbtn_imprimirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_imprimirActionPerformed
        // TODO add your handling code here:
        float filas =this.jtable_modelo_traspaso.getRowCount();
        float paginas = filas /30;
        int ni=0;
        System.out.println("Hola numero de paginas"+paginas+" filas"+filas);
        for(ni=0;ni<paginas;ni++)
             {
                 System.out.println("Hola numero de paginas"+ni);
                 //this.imprimir(ni,paginas);
                  this.imprimirfortras(ni,paginas);
             }
}//GEN-LAST:event_jbtn_imprimirActionPerformed

    private void jtf_fotosartxpagActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_fotosartxpagActionPerformed
        // TODO add your handling code here:
        this.carga_datos_fotospaginacion(Integer.valueOf(this.jtf_paginaactual.getText().toString()));
}//GEN-LAST:event_jtf_fotosartxpagActionPerformed

    private void jbtn_anteriorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_anteriorActionPerformed
        // TODO add your handling code here:
        this.jtf_paginaactual.setText(String.valueOf(Integer.valueOf(this.jtf_paginaactual.getText().toString())-1));
        System.out.println("Esta es la pagina que mando"+this.jtf_paginaactual.getText());
        this.carga_datos_fotospaginacion(Integer.valueOf(this.jtf_paginaactual.getText().toString()));
    }//GEN-LAST:event_jbtn_anteriorActionPerformed

    private void jtf_paginaactualActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_paginaactualActionPerformed
        // TODO add your handling code here:
        this.carga_datos_fotospaginacion(Integer.valueOf(this.jtf_paginaactual.getText().toString()));
}//GEN-LAST:event_jtf_paginaactualActionPerformed

    private void jbtn_siguienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_siguienteActionPerformed
        // TODO add your handling code here:
        this.jtf_paginaactual.setText(String.valueOf(Integer.valueOf(this.jtf_paginaactual.getText().toString())+1));
        System.out.println("Esta es la pagina que mando"+this.jtf_paginaactual.getText());
        this.carga_datos_fotospaginacion(Integer.valueOf(this.jtf_paginaactual.getText().toString()));

    }//GEN-LAST:event_jbtn_siguienteActionPerformed

    private void jTabbedPane1StateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jTabbedPane1StateChanged
        // TODO add your handling code here:
          indexactual = this.jTabbedPane1.getSelectedIndex();
       
        if (indexactual == 1)
            {
                //yacarguefotos = 1;
               this.carga_datos_fotospaginacion(Integer.valueOf(this.jtf_paginaactual.getText().toString()));
            }
    }//GEN-LAST:event_jTabbedPane1StateChanged

    private void jmni_impresioncomActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_impresioncomActionPerformed
        // TODO add your handling code here:
        float filas =this.jtable_modelo_traspaso.getRowCount();
        float paginas = filas /50;
        int ni=0;
        System.out.println("Hola numero de paginas"+paginas+" filas"+filas);
        for(ni=0;ni<paginas;ni++)
             {
                 System.out.println("Hola numero de paginas"+ni);
                 //this.imprimir(ni,paginas);
                  this.imprimirfortrascompleto(ni,paginas);
             }
    }//GEN-LAST:event_jmni_impresioncomActionPerformed

    private void jcbx_tiendasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcbx_tiendasActionPerformed
        // TODO add your handling code here:
        if (controlcombo > 0 ) {

            String selectin="",ubi[]=null;
            int filastar=this.jt_foliosdetalle.getSelectedRow();
            int filastaf=jt_foliosdetalle.getSelectionModel().getMaxSelectionIndex()+1;
            ubi=this.jcbx_tiendas.getSelectedItem().toString().split(":");
            if(JOptionPane.showConfirmDialog(null, "<html><b><h2>Desea Asignar Hubicacion?<br>"+this.jtf_tiendadestino.getText()+"<br>Ubicacion"+ubi[1]+"<br>Clave Inicio:"+jtable_modelo_traspaso.getValueAt(filastar ,2)+"<br>Clave Final:"+jtable_modelo_traspaso.getValueAt(filastaf-1,2)+"</h2></b></html>")==0) {


                System.out.println("Fila inicial:"+filastar+"  fila final:"+filastaf);
                int ii=0,confirma=0;

                for( ii=filastar;ii<filastaf;ii++) {
                    if (ii>0) {
                        selectin+=".";
                    }
                    selectin+=""+jtable_modelo_traspaso.getValueAt(ii ,2)+"";
                }

                System.out.println(selectin);

                String texto="select * from x1sieuno_articulo_inven_ubicacion_update(1,"+this.jtf_idtie1.getText()+",'"+selectin+"','"+ubi[0]+"','"+this.jtf_idtie1.getText()+"','')";
                System.out.println(texto);
                try {
                    rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
                    while (rs.next()) {
                        confirma=rs.getInt(1);
                    }
                } catch(Exception e) {
                    System.out.println(e.getMessage());
                }
                if (confirma==1) {
                    JOptionPane.showMessageDialog(null,"Gracias datos Actualizados Correctamente", "Sistema Integral Insumos",1);
                    //while(jtable_modelo_alm_updatereplace.getRowCount()>0)jtable_modelo_alm_updatereplace.removeRow(0);
                    //this.jtf_busqueda.requestFocus();
                } else {
                    JOptionPane.showMessageDialog(null,"Error Consulte con Su Administrador", "Sistema Integral Insumos",1);
                }
            }
            //this.iniciar_modelo_almacenes(arreglo_tiendas[0],arreglo_tiendas[2]);
        }
}//GEN-LAST:event_jcbx_tiendasActionPerformed
 private void jt_foliosdetalleMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                 new articulos_sie_traspaso_detalle().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JButton jbtn_anterior;
    private javax.swing.JButton jbtn_helpayudame;
    private javax.swing.JButton jbtn_imprimir;
    private javax.swing.JButton jbtn_salir;
    private javax.swing.JButton jbtn_siguiente;
    private javax.swing.JComboBox jcbx_tiendas;
    private javax.swing.JEditorPane jep_observaenvio;
    private javax.swing.JEditorPane jep_observarecibe;
    private javax.swing.JEditorPane jepn_fotos;
    private javax.swing.JLabel jlbl_paginas;
    private javax.swing.JMenuItem jmni_ayuda;
    private javax.swing.JMenuItem jmni_escape;
    private javax.swing.JMenuItem jmni_impresioncom;
    private javax.swing.JMenuItem jmni_salir;
    private javax.swing.JTable jt_foliosdetalle;
    private javax.swing.JTextField jtf_diferencia;
    private javax.swing.JTextField jtf_elaboro;
    private javax.swing.JTextField jtf_fecharecibidotienda;
    private javax.swing.JTextField jtf_fecharecibiotienda;
    private javax.swing.JTextField jtf_foliotienda;
    private javax.swing.JTextField jtf_fotosartxpag;
    private javax.swing.JTextField jtf_idtie;
    private javax.swing.JTextField jtf_idtie1;
    private javax.swing.JTextField jtf_importeprecio;
    private javax.swing.JTextField jtf_importeprecio1;
    private javax.swing.JTextField jtf_importeprecio2;
    private javax.swing.JTextField jtf_importeprecio3;
    private javax.swing.JTextField jtf_paginaactual;
    private javax.swing.JTextField jtf_piezaenvia;
    private javax.swing.JTextField jtf_piezasrecibidas;
    private javax.swing.JTextField jtf_recepciono;
    private javax.swing.JTextField jtf_tiendadestino;
    private javax.swing.JTextField jtf_totalpiezas;
    private javax.swing.JTextField jtf_totalpiezas1;
    private javax.swing.JTextField jtf_totalpiezas2;
    private javax.swing.JTextField tf_status;
    private javax.swing.JTextField tf_tiendaorigen;
    // End of variables declaration//GEN-END:variables
  private com_distri_folios_imprimir objimpresora;
}
